package com.itheima.web.job;

import com.itheima.service.db.AnalysisByDayService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component //定时任务类
public class AnalysisJob {
    @DubboReference
    private AnalysisByDayService analysisByDayService;
    //每一小时运行一次程序
    @Scheduled(cron = "0 0 0/1 * * ?")
    //@Scheduled(cron = "0/30 * * * * ?")
    public void  logToAnalysisByDay(){
        analysisByDayService.LogToAnalysisByDay();
        System.out.println("保存了信息");
    }
}
